<script charset="utf-8" src="<?=STATIC_PATH?>/kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="<?=STATIC_PATH?>/kindeditor/lang/zh_CN.js"></script>
<script type="text/javascript">
$(document).ready(function(){
    $("#add_form").submit(function(){
        if ($("input[name='img']").val() == '') {
            $.dooDialog.alert("图片必须上传");
            return false;
        }

        if ($("input[name='links']").val() == '') {
            $.dooDialog.alert("链接地址必须填写");
            return false;
        }

        return true;
    });

});
</script>
<style>
    .addBox{ }
    .addBox p{ width: 600px;}
    .addBox p label{width: 100px; float: left; text-align: right;}
    .addBox p span{width: 500px;   text-align: left;}
</style>
<div class="listDiv" style="height:85%; ">
    <div class="addBox">
        <form action="/sitemanage/adadd/" id="add_form" method="post" enctype="multipart/form-data">
            <p>&nbsp;&nbsp;&nbsp;<strong>添加广告位</strong></p>
            <p>
                <label>上传图片：</label>
                <span><input type="file" name="img"></span>
            </p>
            <p>
                <label>链接：</label>
                <span><input type="text" name="links"></span>
            </p>
            <p>
                <label>排序：</label>
                <span><input type="text" name="sorts" value="255"></span>
            </p>
            <p>
                <label><input type="submit" class="button01" value="添加"></label>
                <label><input type="button" class="button01" onclick="window.location.href='/sitemanage/ad/'" value="返回"></label>
            </p>
        </form>
    </div>
</div>


